<template>
  <div class="col-xs-6 panel panel-body panel-primary">
    <h2>我是Home的内容</h2>

    <!-- 导航区 -->
    <ul class="nav nav-tabs">
      <li>
        <router-link replace class="list-group-item" :to="{ name: 'xinwen' }">News</router-link>
      </li>
      <li>
        <router-link replace class="list-group-item" :to="{ name: 'xiaoxi' }">Message</router-link>
      </li>
    </ul>
    <keep-alive>
      <router-view></router-view>
    </keep-alive>

  </div>
</template>

<script>
export default {
  name: 'Home',
  mounted() {
    console.log('组件挂在');
  },
  beforeDestroy() {
    console.log('home组件卸载');
  },
};
</script>

<style scoped></style>